// @Author EthanScriptOn
// @Desc
package holder

import "time"

type ExecutionTime struct {
	BeginTime    time.Time
	FinishTime   time.Time
	ExecuteTime  time.Duration
	ExpectedTime time.Duration
	TimeUnit     ExecuteTimeUnit
}

func NewExecutionTime(timeUnit ExecuteTimeUnit) *ExecutionTime {
	return &ExecutionTime{BeginTime: time.Now(), TimeUnit: timeUnit}
}

type ExecutionState struct {
	ExecuteState ExecuteState
	Reason       string
}

func NewExecutionStateDefault() *ExecutionState {
	return &ExecutionState{
		ExecuteState: EXECUTE_PREPARATION,
		Reason:       "",
	}
}

func NewExecutionState(eState ExecuteState, reason string) *ExecutionState {
	return &ExecutionState{
		ExecuteState: eState,
		Reason:       reason,
	}
}
